package com.htyy.yutao.configure;

import android.content.Context;
import android.text.InputType;
import android.webkit.JavascriptInterface;
import android.widget.EditText;
import android.widget.Toast;


/**
 * Created by Asus on 2018/5/7.
 */

public class MyObject {
    private Context context;
    public MyObject(Context context) {
        this.context = context;
    }

    //将显示Toast和对话框的方法暴露给JS脚本调用
    @JavascriptInterface
    public void showToast(String name) {
        Toast.makeText(context, name, Toast.LENGTH_SHORT).show();
    }
    public void showNumber(){
//        EditText et = (EditText) findViewById(R.id.etTest);
//       et.setInputType(InputType.TYPE_CLASS_NUMBER);
    }
}
